package com.woniuxy.gateway;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;

@SpringBootApplication
@EnableCircuitBreaker   //开启hystrix熔断器
/**
 *
 * TODO 指定排除扫描的包
 */
@ComponentScan(basePackages = "com.woniuxy",
        excludeFilters = @ComponentScan.Filter(
                type = FilterType.REGEX,
                pattern = {
                        "com.woniuxy.commons.interceptor.*",
                        "com.woniuxy.commons.config.swagger.*"
                ,}))
@EnableFeignClients(basePackages = "com.woniuxy.commons.service")
public class GatewayApplication {

    public static void main(String[] args) {
        SpringApplication.run(GatewayApplication.class, args);
    }

}
